//var FightScene = require("../../scripts/FightScene");
//var skillContent = require("../../scripts/skillContent");

module.exports = {
    Pets : [
        cc.Class({
            properties: {
                m_FightScene : null,
                target : null,
                name : "Finch",
                Blood : 1456,
                cur_blood : 1456,
                Attack : 354,
                Defense : 45,
                skillContent : null,
                texture : "Demon_tex",
                skeleton : "Demon_ske",
                armature : "armatureName",
                //normal_anim : "normal",
                //defend_anim : "defend",
            },
            ctor(){
                this.skillContent = [
                    {name : "气死我嘞",summary : "自己的血量减少50%", anim : "skill0"},
                    {name : "打你一下",summary : "给对面造成20%的固定伤害", anim : "skill1"},
                    {name : "翻天覆地",summary : "自己的攻击力上升100", anim : "skill2"},
                    {name : "啊我死了",summary : "被对面的魅力震慑", anim : "dead"},
                    {name : "愣住",summary : "啥也不做，就发一下呆", anim : "freeze"},
                    {name : "溜了溜了",summary : "自暴自弃，血量归零", anim : "run"},
                    {name : "无语了",summary : "嘲讽对面，对面攻击力削弱50%", anim : "stun"},
                    {name : "笑死我了",summary : "战斗还没结束，提前庆祝", anim : "win"},
                    {name : "测试名称",summary : "我就瞎写一个技能", anim : "skill0"},
                ];
            },
            skill(skillIndex){
                switch(skillIndex){
                    case 0 : {this.cur_blood = 0.5 * this.cur_blood; this.m_FightScene.outMsg(this.name+"感觉哪里有些不对");break;}
                    case 1: {this.target.cur_blood -= 0.2 * this.target.Blood;this.m_FightScene.outMsg(this.target.name+"说：卧槽，这什么伤害");break;}
                    case 2: {this.Attack+=100;this.m_FightScene.outMsg(this.name+"感觉自己能够一打五");break;}
                    case 3: {this.m_FightScene.outMsg(this.name+"陷入深深的陶醉之中...");break;}
                    case 4: {this.m_FightScene.outMsg(this.name+"发呆中...");break;}
                    case 5: {this.cur_blood = 0;break;}
                    case 6: {this.target.Attack = 0.5 * this.target.Attack;this.m_FightScene.outMsg(this.target.name+"感觉很难受");break;}
                    case 7: {this.m_FightScene.outMsg(this.name+"笑岔了气");break;}
                    case 8: {this.m_FightScene.outMsg("hello world");break;}
                }
            },
            onTurn(TurnIndex){
                switch(TurnIndex){
                    case 0 : {break;}
                }
            }//[0]my turn before -> [1]my turn after  -> [2]your turn before -> [3]your turn after
        }),
    ]
}